import http from '@/utils/request.js'

// rest-api获取库位id /api/dispatch/basic-data/locations/
export function locationInfo (name) {
  return http({
    url: '/api/dispatch/basic-data/locations/?location_name=' + name,
    method: 'get',
    dataType: 'json',
    header: {
      contentType: 'application/json'
    }
  })
}
// rest-api根据库位id获取托盘信息 /api/dispatch/basic-data/objects/
export function locationObject (id) {
  return http({
    url: '/api/dispatch/basic-data/objects/?current_location_id=' + id,
    method: 'get',
    dataType: 'json',
    header: {
      contentType: 'application/json'
    }
  })
}
// 中间件
export function finishedData () {
  return http({
    url: '/finpro/all_info',
    method: 'get',
    dataType: 'json',
    header: {
      contentType: 'application/json'
    }
  })
}